package com.findyou.headline.dao;

import com.findyou.headline.pojo.NewsHeadline;
import com.findyou.headline.pojo.vo.HeadlineDetailVo;
import com.findyou.headline.pojo.vo.HeadlinePageVo;
import com.findyou.headline.pojo.vo.HeadlineQueryVo;

import java.util.List;

public interface NewsHeadlineDao {
    /**
     *
     * @param headlineQueryVo
     * @return
     */
    List<HeadlinePageVo> findPageList(HeadlineQueryVo headlineQueryVo);

    /**
     *
     * @param headlineQueryVo
     * @return
     */
    int findPageCount(HeadlineQueryVo headlineQueryVo);

    /**
     * 增加阅读量 浏览量 + 1
     * @param hid
     */
    int incrPageViews(int hid);

    /**
     * 根据hid 返回数据的具体内容
     * @param hid
     * @return
     */
    HeadlineDetailVo findHeadlineDetail(int hid);

    /**
     *
     * @param newsHeadline
     */
    void addNewsHeadline(NewsHeadline newsHeadline);

    /**
     *
     * @param hid
     * @return
     */
    NewsHeadline findByHid(int hid);

    /**
     *
     * @param newsHeadline
     */
    void update(NewsHeadline newsHeadline);

    /**
     *
     * @param hid
     */
    void removeByHid(int hid);
}
